﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using LumenWorks.Framework.IO.Csv;
using System.IO;

namespace SohuWeb.Models {
    public class Utility {
        public static DataTable ReadCSVFile(string csvPath) {
            DataTable dTable = new DataTable();
            using (CsvReader csv = new CsvReader(
                       new StreamReader("data.csv"), true)) {
                dTable.Load(csv);
            }
            return dTable;
            //using (CachedCsvReader csv = new CachedCsvReader(new StreamReader(filePath), true)) {
            //    DataTable Table = new DataTable();
            //    Table.Load(csv);
            //}
        }
    }
}